{hasRight rule="website_Properties"}
{hasDocRight document=$website module="website" rule="edit"}
<h1>{t}Edit website{/t} "{$websiteLabel}"</h1>
<div id="moduleTabs">
     <ul>
         <li><a class="selected" href=""><span>{t}Properties{/t}</span></a></li>
     </ul>
</div>
<div id="formStatus">{$errors.status}</div>
<form name="form" method="post" action="?module=website&action=block_WebsiteEdit&docId={$website->getUniqueId()}&docLang={$website->getLang()}" id="ajaxForm">
	<div class="submitButton"><button type="reset" class="greyButton" >{t}Cancel{/t}</button> <button type="submit" name="form[submit]" class="greenButton" >{t}Save{/t}</button></div>
	<table class="listTable">
		<tr>
            <td style="width:20px;">{t assignTo=help}Label - The website label is only used in admin panel for identification.{/t}{icon name="help.png" class="toolTip" title=$help}</td>
            <td>{t}Label{/t}</td><td><input type="text" name="form[label]" value="{$website->getLabel()|escape:"html"}" style="width:300px" /> {if $errors.label}{icon name="warning.png"} {$errors.label}{/if}</td></tr>
		<tr>
            <td>{t assignTo=help}URL - This is the url of the website. This will be used to know which website is used.{/t}{icon name="help.png" class="toolTip" title=$help}</td>
		{if $website->isATranslation()}
            <td>{t}URL{/t}</td><td>http://{$website->getRealUrl()}</tr>
		{else}
            <td>{t}URL{/t}</td><td>http://<input type="text" name="form[url]" value="{$website->getUrl()|escape:"html"}" style="width:300px" /> {if $errors.url}{icon name="warning.png"} {$errors.url}{/if}</td>
		{/if}
        </tr>
        {if count($frontLangs) > 1}
        <tr>
            <td>{t assignTo=help}Display language - This language is used by templates. Your templates must support this language to display correctly.{/t}{icon name="help.png" class="toolTip" title=$help}</td>
            <td>{t}Templates language{/t}</td>
            <td>
                <select name="form[displayLang]" style="height:22px;">
                    {foreach from=$frontLangs item=lang}
                    <option value="{$lang.iso_639_1|lower}" {if strtolower($lang.iso_639_1) == $website->getDisplayLang()}selected="selected"{/if}>{$lang.label_en} ({if $lang.label_orig && $lang.label_orig != $lang.label_en}{$lang.label_orig} - {/if}{$lang.iso_639_1})</option>
                    {/foreach}
                </select>
            </td>
        </tr>
        {/if}
        <tr>
            <td>{t assignTo=help}Theme - You can select a design theme for your website.{/t}{icon name="help.png" class="toolTip" title=$help}</td>
            <td>{t}Website theme{/t}</td>
            <td>
                <select name="form[theme]" style="height:22px;">
                    {foreach from=$themes item=theme}
                    <option value="{$theme}" {if $theme == $website->getTheme()}selected="selected"{/if}>{$theme}</option>
                    {/foreach}
                </select>
            </td>
        </tr>
        <tr><th colspan="3">{t}Information{/t}</th></tr>
        <tr><td></td><td>{t}Id{/t}</td><td>{$website->getUniqueId()}</td></tr>
		<tr><td></td><td>{t}Language{/t}</td><td>{$website->getLang()}</td></tr>
		<tr><td></td><td>{t}Author{/t}</td><td>{$website->getAuthor()}</td></tr>
		<tr><td></td><td>{t}Last modification{/t}</td><td>{date date=$website->getModificationDate()}</td></tr>
		<tr><td></td><td>{t}Publication status{/t}</td><td>{$website->getPublicationStatus()}</td></tr>
	</table>
</form>
{/hasDocRight}
{/hasRight}